package com.qf.hsr.demo01;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author q
 * @version V1.0
 * @date 2021/11/06
 **/
public class Application {

    public static void main(String[] args) {

        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("applicationContext.xml");
        UserServiceImpl userService = (UserServiceImpl) applicationContext.getBean("userService");

        UserServiceProxy proxy = (UserServiceProxy) applicationContext.getBean("userServiceProxy");

        proxy.setUserService(userService);

        proxy.save();
        proxy.update();

    }

}
